/*!
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 *
 * Modifications Copyright OpenSearch Contributors. See
 * GitHub history for details.
 */

.ouiLoadingContent__loader {
  display: block;
  width: 100%;
}

.ouiLoadingContent__singleLine {
  display: block;
  width: 100%;
  height: $ouiSize;
  margin-bottom: $ouiSizeS;
  border-radius: $ouiBorderRadius;
  overflow: hidden;

  &:last-child:not(:only-child) {
    width: 75%;
  }
}

.ouiLoadingContent__singleLineBackground {
  display: block;
  width: 220%;
  height: 100%;
  background: linear-gradient(
    137deg,
    $ouiGradientStartStop 45%,
    $ouiGradientMiddle 50%,
    $ouiGradientStartStop 55%,
    );

  // sass-lint:disable-block mixins-before-declarations
  @include ouiCanAnimate {
    animation: ouiLoadingContentGradientLoad 1.5s $ouiAnimSlightResistance infinite;
  }
}

@keyframes ouiLoadingContentGradientLoad {
  0% {
    transform: translateX(-53%);
  }

  100% {
    transform: translateX(0);
  }
}

